<html>
<head><meta charset="utf-8"><title>popping evaluated frame · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html">popping evaluated frame</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="170691200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170691200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170691200">(Jul 12 2019 at 03:25)</a>:</h4>
<p>Hi. Is there any way to either avoid Miri popping the initial frame, or add a hook before its popped off?</p>



<a name="170713074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170713074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170713074">(Jul 12 2019 at 11:02)</a>:</h4>
<p><code>pop_stack_frame()</code> <a href="https://github.com/rust-lang/rust/blob/1b1b538843503568994c7ef37ea8206f0ee3c2e4/src/librustc_mir/interpret/eval_context.rs#L587" target="_blank" title="https://github.com/rust-lang/rust/blob/1b1b538843503568994c7ef37ea8206f0ee3c2e4/src/librustc_mir/interpret/eval_context.rs#L587">calls</a> <code>Machine::stack_pop()</code>. That's the only existing place I could see being used as a hook. The rest of <code>pop_stack_frame()</code> seems to expect that the initial frame will always be popped so it doesn't look like that's currently configurable.</p>



<a name="170716615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170716615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170716615">(Jul 12 2019 at 12:14)</a>:</h4>
<p>priroda prevents the last frame from being popped</p>



<a name="170725126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170725126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170725126">(Jul 12 2019 at 14:15)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> thanks</p>



<a name="170725136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170725136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170725136">(Jul 12 2019 at 14:15)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> I'll look at what you said too. Ta.</p>



<a name="170725738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170725738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170725738">(Jul 12 2019 at 14:23)</a>:</h4>
<p>(presumably priroda calls <code>step</code> manually to do. will check soon)</p>



<a name="170741948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170741948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170741948">(Jul 12 2019 at 17:52)</a>:</h4>
<p>Guessing this is the relevant bit: <a href="https://github.com/oli-obk/priroda/blob/master/src/step.rs" target="_blank" title="https://github.com/oli-obk/priroda/blob/master/src/step.rs">https://github.com/oli-obk/priroda/blob/master/src/step.rs</a></p>



<a name="170741957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170741957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170741957">(Jul 12 2019 at 17:52)</a>:</h4>
<p>specifically, the <code>step</code> fn there</p>



<a name="170764241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170764241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170764241">(Jul 12 2019 at 23:59)</a>:</h4>
<p>Ah, <code>before_terminator</code> + <code>is_ret</code> seems like a good way to hook onto such events. Not much different from stepping through manually (with <code>is_ret</code>) mind you... thanks for the tips guys.</p>



<a name="170766180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170766180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170766180">(Jul 13 2019 at 00:46)</a>:</h4>
<p>Slightly related question: is it possible to either to exclude or at least recognise drop glue for functions/frames in Miri? It seems stack-popping takes care of cleaning up such locals anyway, and I'd like to know which locals are "live" at the end of a function. (i.e. haven't been moved.)</p>



<a name="170779344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170779344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170779344">(Jul 13 2019 at 07:35)</a>:</h4>
<p>You know the liveness of a local by looking at its entry in the frame. StorageDead cleans up all locals that do not need to be live for the entire function. This is reflected in the LocalState iirc</p>



<a name="170791098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170791098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170791098">(Jul 13 2019 at 14:03)</a>:</h4>
<p>I see</p>



<a name="170791141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170791141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170791141">(Jul 13 2019 at 14:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> What about moved locals? Are they reflected/treated differently in the frame state?</p>



<a name="170791704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170791704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170791704">(Jul 13 2019 at 14:21)</a>:</h4>
<p>They have storagedead statements</p>



<a name="170792721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170792721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170792721">(Jul 13 2019 at 14:52)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> Right, so I guess I can't really distinguish between the two? Or somehow avoid having StorageDead statements for ones that are not moved but merely got unused after a certain point?</p>



<a name="170794763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170794763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170794763">(Jul 13 2019 at 15:48)</a>:</h4>
<p>No there's no difference</p>



<a name="170794766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170794766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170794766">(Jul 13 2019 at 15:48)</a>:</h4>
<p>You can collect the info yourself though</p>



<a name="170794782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170794782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170794782">(Jul 13 2019 at 15:49)</a>:</h4>
<p>Visit each statement and when you encounter a visit_local call check the context for moves</p>



<a name="170795128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170795128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170795128">(Jul 13 2019 at 15:58)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> makes sense. thanks!</p>



<a name="170795816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170795816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170795816">(Jul 13 2019 at 16:17)</a>:</h4>
<p>looks like <code>RequiresStorage</code> in <code>storage_liveness</code> already does something similar to this if I'm not mistaken</p>



<a name="170796195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170796195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170796195">(Jul 13 2019 at 16:25)</a>:</h4>
<p>That's static information right? Not dynamic,  so a variable that isn't used at all in a specific run will not be treated as unused</p>



<a name="170796616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/170796616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#170796616">(Jul 13 2019 at 16:37)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> Ah true. It's dataflow analysis, so static... I think parts like the <code>MoveVisitor</code> can be reused though. It concerns itself with borrows though, which I probably don't need to worry about.</p>



<a name="173701615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/173701615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#173701615">(Aug 20 2019 at 22:28)</a>:</h4>
<p>Guys, is there any reason for the import style in miri, out of curiosity? That is, "pooling" everything as <code>pub use</code>s in the crate root.</p>



<a name="173701622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/173701622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#173701622">(Aug 20 2019 at 22:28)</a>:</h4>
<p>and then doing <code>use crate::*</code> in various modules.</p>



<a name="174035568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174035568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174035568">(Aug 24 2019 at 11:34)</a>:</h4>
<p>laziness, I guess?</p>



<a name="174057579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174057579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174057579">(Aug 24 2019 at 22:47)</a>:</h4>
<blockquote>
<p>laziness, I guess?</p>
</blockquote>
<p>hah okay. just checking there wasn't a particular reason... probably right.</p>



<a name="174075737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174075737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174075737">(Aug 25 2019 at 08:47)</a>:</h4>
<p>there's many ways to structure your Rust programs, and with the sheer number of imports miri needs I have to say I like this style -- makes it much easier to split code into modules as you dont have to spend 30min teasing the imports apart.</p>



<a name="174112074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174112074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174112074">(Aug 26 2019 at 03:27)</a>:</h4>
<p>Agreed. The only downside is that you lose "structure"... which can be a good or bad thing. But probably not terribly worth maintaining here.</p>



<a name="174195645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174195645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174195645">(Aug 27 2019 at 04:24)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> is there any way to create values of stdlib types from inside miri (say, implementing an intrinsic)?</p>



<a name="174249238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174249238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174249238">(Aug 27 2019 at 17:09)</a>:</h4>
<p>dozens of intrinsics and FFI stubs are already implemented, did you check those?</p>



<a name="174249248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174249248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174249248">(Aug 27 2019 at 17:09)</a>:</h4>
<p>look for files called "<a href="http://intrinsics.rs" target="_blank" title="http://intrinsics.rs">intrinsics.rs</a>"</p>



<a name="174257083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174257083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174257083">(Aug 27 2019 at 18:40)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> oh yeah, saw that. nothing there to do with creating values of stdlib types though. just primitive types and pointers.</p>



<a name="174258183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174258183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174258183">(Aug 27 2019 at 18:52)</a>:</h4>
<p>oh I see. then I don't think this has been done before.</p>



<a name="174258223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174258223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174258223">(Aug 27 2019 at 18:52)</a>:</h4>
<p>there's certainly a way, but you'll have to manually interact with the interpreter APIs: allocate some space, obtain <code>Place</code>s for the fields you are about, writing to them, ...</p>



<a name="174315373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174315373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174315373">(Aug 27 2019 at 22:26)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> okay, I'll have a look, thanks</p>



<a name="174423446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174423446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174423446">(Aug 29 2019 at 04:47)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> Hmm, would I not simply do this to return a null pointer (of any type), when implementing an intrinsnic?</p>



<a name="174423448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174423448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174423448">(Aug 29 2019 at 04:47)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">                </span><span class="n">this</span><span class="p">.</span><span class="n">write_scalar</span><span class="p">(</span><span class="w"></span>
<span class="w">                    </span><span class="n">Scalar</span>::<span class="n">ptr_null</span><span class="p">(</span><span class="n">this</span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="n">dest</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="p">)</span><span class="o">?</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="174428210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174428210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174428210">(Aug 29 2019 at 06:42)</a>:</h4>
<p>that works for intrinsics returning something of pointer type, yes</p>



<a name="174428231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174428231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174428231">(Aug 29 2019 at 06:43)</a>:</h4>
<p>of course if it is a reference or <code>Box</code>, that cannot be right^^</p>



<a name="174479421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479421">(Aug 29 2019 at 18:24)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> yeah. It's a <code>*const dyn Debug</code> in fact</p>



<a name="174479470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479470">(Aug 29 2019 at 18:24)</a>:</h4>
<p>weird that I'm getting this error then:</p>
<div class="codehilite"><pre><span></span>thread &#39;rustc&#39; panicked at &#39;assertion failed: `(left == right)`
  left: `Size { raw: 8 }`,
 right: `Size { raw: 16 }`: Size mismatch when writing bits&#39;, src/librustc_mir/interpret/place.rs:705:21
</pre></div>



<a name="174479604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479604">(Aug 29 2019 at 18:26)</a>:</h4>
<p>(on that exact call to <code>write_scalar</code>, indeed)</p>



<a name="174479747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479747">(Aug 29 2019 at 18:28)</a>:</h4>
<p>yeah, <code>ptr_null</code> is ptr-sized</p>



<a name="174479751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479751">(Aug 29 2019 at 18:28)</a>:</h4>
<p>wide raw pointers are twice as big</p>



<a name="174479780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479780">(Aug 29 2019 at 18:28)</a>:</h4>
<p>you'll need a <code>ScalarPair</code> where the first component is a <code>ptr_null</code>, and the 2nd points to a valid vtable</p>



<a name="174479803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479803">(Aug 29 2019 at 18:29)</a>:</h4>
<p>(there's a reason that there is no <code>ptr::null()</code> for unsized types...)</p>



<a name="174479808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174479808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174479808">(Aug 29 2019 at 18:29)</a>:</h4>
<p>ah yes, that makes sennse</p>



<a name="174481301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174481301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174481301">(Aug 29 2019 at 18:46)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> seems to work now, thanks</p>



<a name="174483786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483786">(Aug 29 2019 at 19:16)</a>:</h4>
<p>what are you using for the vtable?</p>



<a name="174483904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483904">(Aug 29 2019 at 19:18)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> I just use the <code>*const T</code> argument to the intrinsic fn (but check that <code>T: Debug</code> actually holds first)</p>



<a name="174483912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483912">(Aug 29 2019 at 19:18)</a>:</h4>
<p>I think that's okay?</p>



<a name="174483923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483923">(Aug 29 2019 at 19:18)</a>:</h4>
<p>what is the intrinsic?</p>



<a name="174483950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483950">(Aug 29 2019 at 19:19)</a>:</h4>
<p><code>*const T</code> doesnt look like a vtable ptr to me...</p>



<a name="174483967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483967">(Aug 29 2019 at 19:19)</a>:</h4>
<p>it's a new one I'm making for the REPL. only available in the REPL. <code>as_debug</code></p>



<a name="174483974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483974">(Aug 29 2019 at 19:19)</a>:</h4>
<p>hmm</p>



<a name="174483978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174483978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174483978">(Aug 29 2019 at 19:19)</a>:</h4>
<p>how would I get the vtable pointer just from that then?</p>



<a name="174484646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174484646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174484646">(Aug 29 2019 at 19:28)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> I guess I need to destruct the fat pointer somehow... but how do I get the one for <code>Debug</code>?</p>



<a name="174489372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174489372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174489372">(Aug 29 2019 at 20:27)</a>:</h4>
<p>given the type and the trait, there are rustc methods to build a vtable for that</p>



<a name="174489384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174489384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174489384">(Aug 29 2019 at 20:27)</a>:</h4>
<p>I think for Miri they are in <code>traits.rs</code></p>



<a name="174491107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174491107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174491107">(Aug 29 2019 at 20:48)</a>:</h4>
<p>interesting</p>



<a name="174491194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174491194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174491194">(Aug 29 2019 at 20:49)</a>:</h4>
<p><code>machine.get_vtable</code> -- perfect</p>



<a name="174492907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174492907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174492907">(Aug 29 2019 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> the use in the <code>unsize_into_ptr</code> method... that's how I'd do it too? for a <code>*const T -&gt; *const dyn Debug</code> cast?</p>



<a name="174523038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174523038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174523038">(Aug 30 2019 at 07:51)</a>:</h4>
<p>assuming <code>T: Debug</code>, yes</p>



<a name="174563365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174563365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174563365">(Aug 30 2019 at 17:04)</a>:</h4>
<p>got it, ta.</p>



<a name="174847566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174847566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174847566">(Sep 04 2019 at 03:04)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> Since my rebase I'm getting <code>no mir for std::rt::lang_start_internal</code> again. I guess this is because the <code>test-miri</code> config option is gone, so I no longer have a sysroot build. I looked at the README, but didn't see anything. What's the right approach presently?</p>



<a name="174847702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174847702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174847702">(Sep 04 2019 at 03:08)</a>:</h4>
<p>obviously this is using a nightly rustc still.</p>



<a name="174892655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174892655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174892655">(Sep 04 2019 at 15:25)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> maybe you know, too?</p>



<a name="174905256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174905256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174905256">(Sep 04 2019 at 17:52)</a>:</h4>
<p>Eh, don't worry... think I've figured it out.</p>



<a name="174905270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/174905270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#174905270">(Sep 04 2019 at 17:52)</a>:</h4>
<p>Get a weird stack overflow since the rebase though.</p>



<a name="175748418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175748418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175748418">(Sep 15 2019 at 13:12)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> Since my rebase I'm getting <code>no mir for std::rt::lang_start_internal</code> again. I guess this is because the <code>test-miri</code> config option is gone, so I no longer have a sysroot build. I looked at the README, but didn't see anything. What's the right approach presently?</p>
</blockquote>
<p>FTR, you have to use xargo to build libstd. <code>cargo miri setup</code> will do it for you.</p>



<a name="175750715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175750715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175750715">(Sep 15 2019 at 14:11)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> thanks. I had figured that out, but sync the rebase, I'm getting a problem importing the prelude when compiling:<br>
<code>error[E0433]: failed to resolve: unresolved import</code> -- ever encountered this before?</p>



<a name="175799640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175799640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175799640">(Sep 16 2019 at 10:17)</a>:</h4>
<p>you might be running into <a href="https://github.com/rust-lang/rust/issues/64410" target="_blank" title="https://github.com/rust-lang/rust/issues/64410">https://github.com/rust-lang/rust/issues/64410</a> ?</p>



<a name="175824220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175824220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175824220">(Sep 16 2019 at 15:41)</a>:</h4>
<p>hmm, interesting</p>



<a name="175824226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175824226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175824226">(Sep 16 2019 at 15:41)</a>:</h4>
<p>let's see.</p>



<a name="175826995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175826995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175826995">(Sep 16 2019 at 16:10)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> hmm, seems to be more of a strange issue with not being able to find the sysroot, but I'm not sure</p>



<a name="175827006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175827006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175827006">(Sep 16 2019 at 16:10)</a>:</h4>
<p>I've checked the sysroot is getting built</p>



<a name="175827012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175827012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175827012">(Sep 16 2019 at 16:10)</a>:</h4>
<p>and passed to the compiler correctly</p>



<a name="175827040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/popping%20evaluated%20frame/near/175827040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/popping.20evaluated.20frame.html#175827040">(Sep 16 2019 at 16:11)</a>:</h4>
<p>miri finds it okay, but not my project</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>